/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "cex_hemogramas_otros")
@NamedQueries({
    @NamedQuery(name = "CexHemogramasOtros.findAll", query = "SELECT c FROM CexHemogramasOtros c")})
public class CexHemogramasOtros implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "che_id")
    private Integer cheId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 128)
    @Column(name = "che_nombre")
    private String cheNombre;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 16)
    @Column(name = "che_extension")
    private String cheExtension;
    @Basic(optional = false)
    @NotNull
    @Column(name = "che_archivo")
    private short cheArchivo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "che_fecha")
    @Temporal(TemporalType.DATE)
    private Date cheFecha;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 16)
    @Column(name = "hc_historia_clinica")
    private String hcHistoriaClinica;
    @OneToMany(mappedBy = "cexHemogramasOtros", fetch = FetchType.LAZY)
    private List<CexEstudiosComplementarios> cexEstudiosComplementariosList;

    public CexHemogramasOtros() {
    }

    public CexHemogramasOtros(Integer cheId) {
        this.cheId = cheId;
    }

    public CexHemogramasOtros(Integer cheId, String cheNombre, String cheExtension, short cheArchivo, Date cheFecha, String hcHistoriaClinica) {
        this.cheId = cheId;
        this.cheNombre = cheNombre;
        this.cheExtension = cheExtension;
        this.cheArchivo = cheArchivo;
        this.cheFecha = cheFecha;
        this.hcHistoriaClinica = hcHistoriaClinica;
    }

    public Integer getCheId() {
        return cheId;
    }

    public void setCheId(Integer cheId) {
        this.cheId = cheId;
    }

    public String getCheNombre() {
        return cheNombre;
    }

    public void setCheNombre(String cheNombre) {
        this.cheNombre = cheNombre;
    }

    public String getCheExtension() {
        return cheExtension;
    }

    public void setCheExtension(String cheExtension) {
        this.cheExtension = cheExtension;
    }

    public short getCheArchivo() {
        return cheArchivo;
    }

    public void setCheArchivo(short cheArchivo) {
        this.cheArchivo = cheArchivo;
    }

    public Date getCheFecha() {
        return cheFecha;
    }

    public void setCheFecha(Date cheFecha) {
        this.cheFecha = cheFecha;
    }

    public String getHcHistoriaClinica() {
        return hcHistoriaClinica;
    }

    public void setHcHistoriaClinica(String hcHistoriaClinica) {
        this.hcHistoriaClinica = hcHistoriaClinica;
    }

    public List<CexEstudiosComplementarios> getCexEstudiosComplementariosList() {
        return cexEstudiosComplementariosList;
    }

    public void setCexEstudiosComplementariosList(List<CexEstudiosComplementarios> cexEstudiosComplementariosList) {
        this.cexEstudiosComplementariosList = cexEstudiosComplementariosList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cheId != null ? cheId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CexHemogramasOtros)) {
            return false;
        }
        CexHemogramasOtros other = (CexHemogramasOtros) object;
        if ((this.cheId == null && other.cheId != null) || (this.cheId != null && !this.cheId.equals(other.cheId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.CexHemogramasOtros[ cheId=" + cheId + " ]";
    }
    
}
